from flask import redirect, url_for, render_template

from core.api.url import url_for_page_view_post, url_for_page_edit_personal
from factory import create_app, create_db
app = create_app()
create_db()
import requests

@app.route('/')
def hello_world():  # put application's code here
    from models import Post,insert
    post = Post()
    post.uid = 1
    post.sort='求助'
    insert(post)
    return redirect(url_for_page_edit_personal(1))
    #return redirect(url_for('api.page_view_personal',uid=1))
    #return render_template('page/test.html',personal={'head':Head_uid(1)})


if __name__ == '__main__':
    app.run()
